import request from "@/router/axios";
import { baseUrl } from "@/config/env";

//添加所有配置
export function addGlobeConfig(data) {
  return request({
    url: baseUrl + "/pc/globe-config",
    method: "post",
    data
  });
}

//查询所有配置
export function getGlobeConfig(data) {
  return request({
    url: baseUrl + "/pc/globe-config",
    method: "get",
    params: data
  });
}

//删除所有配置
export function deleteGlobeConfig(data) {
  return request({
    url: baseUrl + "/pc/globe-config",
    method: "delete",
    data
  });
}

//更新所有配置
export function updateGlobeConfig(data) {
  return request({
    url: baseUrl + "/pc/globe-config",
    method: "put",
    data
  });
}

//通过name查询
export function searchGlobeConfig(data) {
    return request({
      url: baseUrl + "/pc/globe-config/byName?name=" + data,
      method: "get",
    });
  }

//生成本学期数据
export function staticData(data) {
  return request({
    url: baseUrl + "/pc/static-data",
    method: "post",
    data
  });
}